import Vue from 'vue'
import App from './App.vue'
import router from './router'
import httpRequest from './common/request.js';
import { Tabbar, TabbarItem, Search } from 'vant';
import { Swipe, SwipeItem } from 'vant';
import { Image as VanImage, Lazyload } from 'vant';
import { NavBar, List } from 'vant';
import { Tab, Tabs } from 'vant';

Vue.use(VanImage);
Vue.use(Lazyload);//引入图片和懒加载组件

Vue.use(Swipe);//轮播
Vue.use(SwipeItem);

Vue.use(Tabbar);//标签栏
Vue.use(TabbarItem);
Vue.use(Search);//搜索框
Vue.use(NavBar);//导航栏
Vue.use(List);
Vue.use(Tab);
Vue.use(Tabs)

Vue.config.productionTip = false
Vue.prototype.$request = httpRequest//引入封装


// 全局过滤器
Vue.filter("numFilter", function (value, num) {
  return parseFloat(value / 10000).toFixed(num)
})
import store from './store'

//创建和挂载根实例
new Vue({
  store,
  router,
  render: h => h(App)
}).$mount('#app')
